<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>047-轮播图</title>
    <style>
      .contain {
        position: relative;
        margin: auto;
        width: 600px;
        height: 200px;
        text-align: center;
        font-family: Arial;
        color: #fff;
        overflow: hidden;
      }
      .contain ul {
        margin: 10px 0;
        padding: 0;
        width: 1800px;
        transition: all 0.5s;
      }
      .contain li {
        float: left;
        width: 600px;
        height: 200px;
        list-style: none;
        line-height: 200px;
        font-size: 36px;
      }
      .one {
        background: #9fa8ef;
      }
      .two {
        background: #ef9fb1;
      }
      .three {
        background: #9fefc3;
      }
      .label1 {
        position: absolute;
        bottom: 10px;
        left: 0px;
        width: 20px;
        height: 20px;
        margin: 0 10px;
        line-height: 20px;
        color: #fff;
        background: #000;
        cursor: pointer;
      }
      .label2 {
        position: absolute;
        bottom: 10px;
        left: 30px;
        width: 20px;
        height: 20px;
        margin: 0 10px;
        line-height: 20px;
        color: #fff;
        background: #000;
        cursor: pointer;
      }
      .label3 {
        position: absolute;
        bottom: 10px;
        left: 60px;
        width: 20px;
        height: 20px;
        margin: 0 10px;
        line-height: 20px;
        color: #fff;
        background: #000;
        cursor: pointer;
      }
      #a:checked ~ ul {
        margin-left: 0;
      }
      #a:checked ~ .label1 {
        background: #535353;
      }
      #b:checked ~ ul {
        margin-left: -600px;
      }
      #b:checked ~ .label2 {
        background: #535353;
      }
      #c:checked ~ ul {
        margin-left: -1200px;
      }
      #c:checked ~ .label3 {
        background: #535353;
      }
    </style>
  </head>
  <body>
    <div class="contain">
      <input type="radio" name="sildeInput" value="0" id="a" hidden>
        <label class="label1" for="a">1</label>
      <input type="radio" name="sildeInput" value="0" id="b" hidden>
        <label class="label2" for="b">2</label>
      <input type="radio" name="sildeInput" value="0" id="c" hidden>
        <label class="label3" for="c">3</label>
      <ul>
        <li class="one">轮播图1</li>
        <li class="two">轮播图2</li>
        <li class="three">轮播图3</li>
      </ul>
    </div>
  </body>
</html>
